<?php
namespace app\admin\model;

use app\admin\model\Artist;
use think\Model;
use think\model\relation\BelongsTo;

/**
 * 艺术家关注模型
 * Class ArtistFollow
 * @package app\admin\model
 */
class ArtistFollow extends Model
{
    protected $table = 'original_artist_follow';
    protected $autoWriteTimestamp = 'int';

    public function artist(): BelongsTo
    {
        return $this->belongsTo(Artist::class, 'artist_id')->bind(['name', 'avatar', 'title','biography']);
    }
}
